<h2>my heros </h2>
<p>pipe time the birth : {{ birth | date:'shortDate'}}</p>
<p> math power {{2 | exsponentialStrength: 8}}</p>
<ul class="heroes">
  <li *ngFor="let hero of heros" [class.selected]="hero === selectHero" (click)="onSelect(hero)">
    <span class="badge">{{hero.id}}</span>{{hero.name}}
    <button class="delete" title="delete hero" (click)="delete(hero)">x</button>
  </li>
</ul>
<div>
  <label>Hero name:
    <input #heroName/>
  </label>
  <!-- (click) passes input value to add() and then clears the input -->
  <button (click)="add(heroName.value); heroName.value=''">
    add
  </button>
</div>

<app-hero-detail [hero]="selectHero"></app-hero-detail>
